Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Fix issue #27, world age problem on v0.6 #30

Merged
merged 3 commits into from
May 25, 2017
Merged

Fix issue #27, world age problem on v0.6 #30

merged 3 commits into from
May 25, 2017

Conversation

ScottPJones
Copy link
Collaborator

Again, trying to deal with Travis-CI issues, same change as before.

@ScottPJones ScottPJones reopened this Jan 28, 2017
@tkelman
Copy link
Contributor

tkelman commented Jan 29, 2017

Would be preferable if you could avoid copy-pasting a refactored copy of a long function here. Please make the change as minimal as possible to fix the issue.

@amitmurthy
Copy link

@tkelman probably better to merge this as is and refactor later. The issue has been open for long and again reported in #36

@tkelman
Copy link
Contributor

tkelman commented Apr 25, 2017

That VERSION cutoff isn't accurate either. If the 0.6 code doesn't work on prior versions of Julia, better to just make the package 0.6-only, drop all the Compat cruft. If bug fixes for 0.4 or 0.5 are needed they could be made off a branch.

@ViralBShah
Copy link
Contributor

I suggest we should merge without worry about refactoring if it fixes a known issue, and have a new issue for refactoring. Of course the VERSION stuff should be done right.

src/cformat.jl Outdated
@@ -1,16 +1,80 @@
formatters = Dict{ Compat.ASCIIString, Function }()

function sprintf1( fmt::Compat.ASCIIString, x )
@static if VERSION >= v"0.6.0-dev.1671"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is static absolutely needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd believed it was the preferred way to deal with sections of code that should not be compiled because of platform or version differences.
Is that not the case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's completely unnecessary at top-level

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that's good to know (it might be nice to have the docstring for @static mention that)
In my own code, I'd just replaced any of the old macros (@windows etc. with @static if ... everwhere, and didn't realize that the @static part was not needed at the top level (does it hurt anything though to leave it in?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it means code in the not evaluated conditional won't trigger warnings or some errors, which sometimes is useful but other times is like ifdefs in c, can hide issues if you only ever develop on systems where one of the branches is true and never the other

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that makes sense, I've removed the @static

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although, in these cases where I've used it to distinguish between v0.5.x and v0.6, both branches are being tested and used (with Travis-CI on GitHub, and at work, where even though we are deploying now on v0.5.1, I'm making sure that we'll be ready for v0.6 as soon as it is released and all of the packages that we use have been updated to not have any deprecations)

@tkelman
Copy link
Contributor

tkelman commented Apr 25, 2017

If duplicating code isn't needed to fix the problem, then this shouldn't be duplicating code.

@ScottPJones
Copy link
Collaborator Author

I've changed to use the exact version number of when JuliaLang/julia#17057 was merged.
This copied the fix that I'd done before in my https://github.com/JuliaString/Format.jl version of this package (which is being actively maintained, whereas this package had not been kept up to date with changes to Julia)

@ScottPJones
Copy link
Collaborator Author

I didn't have the time to rewrite things to make just the minimal changes in order to make this work for the old Formatting.jl package. Somebody had asked me nicely if I could backport my fixes for v0.6 to the old package, hence this PR.
Otherwise, if people want to run on v0.6, they can of course simply use https://github.com/JuliaString/Format.jl instead, which I would recommend, as it is being kept current with changes to Julia in a timely fashion.

@KristofferC
Copy link
Member

Can this be merged cc @tkelman

@tkelman
Copy link
Contributor

tkelman commented May 19, 2017

would be better to drop 0.4 and 0.5 and make this 0.6-only than duplicate everything

@KristofferC
Copy link
Member

KristofferC commented May 19, 2017

Yeah ok, there are a lot of thing that could be better in this world. This package working on 0.6 is better than this package not working.

@tkelman
Copy link
Contributor

tkelman commented May 19, 2017

fine, I'll do it then. I didn't have anything better to do at all than fix my own review request from January.

@tkelman tkelman merged commit c94496c into JuliaIO:master May 25, 2017
@ScottPJones ScottPJones deleted the spj/fixworldage2 branch May 27, 2017 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants